#include <iostream>  // std::cout
#include <algorithm> // std::find
#include <vector>    // std::vector
#include<string.h>
using namespace std;
int main()
{
    //find() 函数作用于普通数组
    char stl[] = "yuexiangyu";
    //调用 find() 查找第一个字符 'c'
    char *p = find(stl, stl + strlen(stl), 'x');
    //判断是否查找成功
    if (p != stl + strlen(stl))
    {
        cout << p << endl;
    }
    //find() 函数作用于容器
    vector<int> myvector{10, 20, 30, 40, 50};
    vector<int>::iterator it;
    it = find(myvector.begin(), myvector.end(), 30);
    if (it != myvector.end())
        cout << "find success:" << *it;
    else
        cout << "find faule";
    return 0;
}